<li class="nav-item {% if Model.HasItems %}dropdown{% endif %}">
    {% shape_clear_alternates Model %}
    {% shape_type Model "MenuItemLink" %}
    {{ Model | shape_render }}
    {% if Model.HasItems %}
        <ul class="dropdown-menu">
            {% for item in Model.Items %}
                {{ item | shape_render }}
            {% endfor %}
        </ul>
    {% endif %}
</li>